package core;

import behaviours.Behaviour;
import behaviours.MainBehaviour;

public class Mati implements Runnable{

	private String host;
	private int port;
	private Behaviour behaviour;

	public Mati(String host, int port) {
		this(host, port, new MainBehaviour());
	}

	public Mati(String host, int port, Behaviour behaviour) {
		this.host = host;
		this.port = port;
		this.behaviour = behaviour;
	}
	
	@Override
	public void run() {
		Bridge.init(host, port);
		try {
			behaviour.execute();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
